import { createStore, applyMiddleware } from 'redux'
// 这个包可以允许我们既使用redux调试工具,又使用redux-thunk
import { composeWithDevTools } from 'redux-devtools-extension'
import thunk from 'redux-thunk'
import countReducer from './components/Count/redux/reducer'
export default createStore(
  countReducer,
  { count: 99 }, // reducer后面的参数,是一个可选参数. 用来初始化store中的数据.并且优先级高于reducer中初始化的代码. 但是几乎不用.正常都是reducer中初始化数据
  composeWithDevTools(applyMiddleware(thunk))
)
